{use master_page('front/v_inner_master')}

{block main_body}

<form class="listform"  action="<?=_U("article/index")?>" method="get">
    <?
    $where = $this->Request();
    $menu = array_remove($where, 'menu');
    // print_r($article_class);exit;
    // $where["class.id"] = $article_class->id;
    if(!empty($_GET['title']))
    {
        $where['article.title'] = "like '%".$this->input->get('title')."%'";
    }

    $where['page_size'] =  10;
    // $where['page'] = !isset($_GET['page'])?1:$this->input->get('page');
    $articles = $this->article_manager->get_list($where);
    $record_count = $this->article_manager->query_result->record_count;
    $page_size=$where['page_size'];
    ?>

    <?php foreach ( $articles as $article):?>
    <div id="article_title"><!-- 一页显示8条 -->
        <ul>
            <li>
                <a href="<?=_U("article/show?id=$article->id?menu=".$_GET['menu'])."&class-id=".$_GET['class-id']?>" target="_blank" class="title">
                    <?php echo mb_strlen($article->title)>10?(mb_substr($article->title,0,10,'UTF8'."...")):$article->title?>
                </a>&nbsp;&nbsp;&nbsp;&nbsp;
                时间：<i>{article->contribute_time}</i>
                <br/>
                <em>
                    <?php echo $article->get_profile(96);?>
                </em>
            </li>
        </ul>
    </div>
    <?php endforeach;?>
    <?php $this->load->view('front/v_pager_form',array('record_count'=>$record_count,'page_size'=>$page_size))?>
</form>

{end}